/* Products Slider Styles */
.products-slider-wrapper {
    position: relative !important;
    width: 100% !important;
    overflow: visible !important;
    z-index: 1 !important;
    background-color: transparent !important;
    margin-bottom: 2rem !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.products-slider-container {
    position: relative !important;
    width: 100% !important;
    overflow: hidden !important;
    /* 💡 هام: ارتفاع ثابت بناءً على أول 4 منتجات */
    height: 650px !important;
    min-height: 650px !important;
    max-height: 650px !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.products-slider-track {
    /* 💡 هام: استخدام block بدلاً من flex لتجنب تعارض مع position: absolute */
    display: block !important;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
    position: relative !important;
    z-index: 1 !important;
    /* 💡 هام: الحاوية تأخذ ارتفاع من الشريحة النشطة */
    min-height: 0 !important;
    height: auto !important;
    width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.products-slide {
    width: 100%;
    /* خصائص الإخفاء للشرائح غير النشطة */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    /* 💡 هام: الشرائح غير النشطة تكون مطلقة التموضع */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
    /* منع التفاعل مع الشرائح المخفية */
    pointer-events: none;
}

    /* 💡 هام: الشريحة النشطة تحدد ارتفاع الحاوية الأب */
    .products-slide.active {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        /* 💡 هام: الشريحة النشطة تكون relative لتحديد ارتفاع الحاوية */
        position: relative !important;
        display: block !important;
        /* السماح بالتفاعل مع الشريحة النشطة */
        pointer-events: auto !important;
    }

    /* 💡 ضمان ظهور أول شريحة إذا لم تكن هناك شريحة نشطة */
    .products-slide:first-child:not(.active) {
        position: relative !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }

    /* 💡 إذا كانت الشريحة الأولى نشطة، تأكد من ظهورها */
    .products-slide.active:first-child {
        position: relative !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 10 !important;
        pointer-events: auto !important;
    }

/* 💡 Fallback: إذا لم تكن هناك شريحة نشطة، اعرض الشريحة الأولى */
.products-slider-track:not(:has(.products-slide.active)) .products-slide:first-child {
    position: relative !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 10 !important;
    pointer-events: auto !important;
}

/* 💡 ضمان ظهور جميع العناصر داخل الشريحة النشطة */
.products-slide.active *,
.products-slide.active .product,
.products-slide.active .product-thumb-info,
.products-slide.active .product-thumb-info-image,
.products-slide.active .product-thumb-info-image img,
.products-slide.active h3,
.products-slide.active .price {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.products-slide.active .product-thumb-info-image img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.products-slide.active h3,
.products-slide.active .price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit !important;
}

/* ============================================
   Navigation Arrows - Enhanced Design
   ============================================ */
.products-slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #333;
    font-size: 20px;
    opacity: 0.85;
    backdrop-filter: blur(10px);
}

    .products-slider-nav:hover {
        background: #fff;
        border-color: #007bff;
        color: #007bff;
        box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
        transform: translateY(-50%) scale(1.1);
        opacity: 1;
    }

    .products-slider-nav:active {
        transform: translateY(-50%) scale(0.95);
    }

    .products-slider-nav:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
    }

.products-slider-prev {
    right: 15px;
}

.products-slider-next {
    left: 15px;
}

.products-slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================
   Slide Indicators - Enhanced Design
   ============================================ */
.products-slider-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.slider-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
}

    .slider-indicator:hover {
        background: #bbb;
        transform: scale(1.3);
        border-color: #999;
    }

    .slider-indicator.active {
        background: #007bff;
        border-color: #0056b3;
        width: 36px;
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
    }

    .slider-indicator.active:hover {
        transform: scale(1.1);
    }

/* Pause on Hover - Smooth transition */
.products-slider-wrapper:hover .products-slider-track {
    transition-duration: 0.8s;
}

/* Ensure autoplay pause/resume works smoothly */
.products-slider-wrapper {
    position: relative;
}

    .products-slider-wrapper:hover .products-slider-nav {
        opacity: 1;
    }

/* Auto-play pause on hover is handled by JavaScript */

/* Responsive Design */
@media (max-width: 992px) {
    .products-slider-nav {
        width: 42px;
        height: 42px;
        font-size: 16px;
    }

    .products-slider-prev {
        right: 8px;
    }

    .products-slider-next {
        left: 8px;
    }
}

@media (max-width: 768px) {
    .products-slider-nav {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .products-slider-prev {
        right: 5px;
    }

    .products-slider-next {
        left: 5px;
    }

    .slider-indicator {
        width: 10px;
        height: 10px;
    }

        .slider-indicator.active {
            width: 24px;
        }
}

@media (max-width: 576px) {
    .products-slider-nav {
        width: 36px;
        height: 36px;
        font-size: 13px;
        opacity: 0.85;
    }

    .products-slider-prev {
        right: 3px;
    }

    .products-slider-next {
        left: 3px;
    }
    
    .products-slider-wrapper {
        margin-bottom: 1.5rem;
    }
}

/* Ensure product cards maintain their styling */
.products-slide .product {
    height: 100%;
}

.products-slide .product-thumb-info {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .products-slide .product-thumb-info:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15) !important;
    }

/* Page Layout & Spacing */
.products-page-container {
    min-height: calc(100vh - 200px);
    padding-bottom: 2rem;
    width: 100%;
    position: relative !important;
    background-color: transparent !important;
    overflow: visible !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

    .products-page-container .container {
        padding-top: 2rem;
        padding-bottom: 2rem;
        max-width: 1200px;
        margin: 0 auto;
        position: relative !important;
        z-index: 1 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
    }

/* ============================================
   Product Cards Layout - Fix Display Issues
   ============================================ */

/* 💡 CRITICAL: Override Bootstrap's default row behavior */
.product-thumb-info-list.row,
.products.row,
.row.product-thumb-info-list,
.row.products {
    display: flex !important;
    flex-wrap: nowrap !important; /* منع الانتقال للصف التالي - عرض أفقي */
    margin-left: -8px !important;
    margin-right: -8px !important;
    --bs-gutter-x: 0 !important;
    --bs-gutter-y: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scroll-behavior: smooth !important;
    height: 100% !important;
    /* إخفاء scrollbar */
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

.product-thumb-info-list.row::-webkit-scrollbar,
.products.row::-webkit-scrollbar,
.row.product-thumb-info-list::-webkit-scrollbar,
.row.products::-webkit-scrollbar {
    display: none !important;
}

/* Product Cards Responsive Improvements */
.product-thumb-info-list {
    margin: 0 -8px !important;
    display: flex !important;
    flex-wrap: wrap !important;
}

/* 💡 CRITICAL: Override Bootstrap's width: 100% on row > * */
.product-thumb-info-list > .col-12,
.product-thumb-info-list > .col-sm-6,
.product-thumb-info-list > .col-lg-3,
.product-thumb-info-list.row > .col-12,
.product-thumb-info-list.row > .col-sm-6,
.product-thumb-info-list.row > .col-lg-3,
.products.row > .col-12,
.products.row > .col-sm-6,
.products.row > .col-lg-3 {
    padding-left: 8px !important;
    padding-right: 8px !important;
    position: relative !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    /* Remove Bootstrap's default width: 100% */
    width: auto !important;
}

/* Ensure 4 products per row on desktop - عرض أفقي */
@media (min-width: 992px) {
    .products-slider-container {
        height: 650px !important;
        min-height: 650px !important;
        max-height: 650px !important;
    }

    .product-thumb-info-list > .col-lg-3,
    .product-thumb-info-list.row > .col-lg-3,
    .products.row > .col-lg-3,
    div.row.product-thumb-info-list > div.col-lg-3,
    div.row.products > div.col-lg-3,
    div.product-thumb-info-list.row > div.col-lg-3,
    div.products.row > div.col-lg-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
        min-width: 25% !important;
    }
    
    /* 💡 منع wrap - المنتجات تظهر أفقيًا */
    .product-thumb-info-list.row,
    .products.row,
    .row.product-thumb-info-list,
    .row.products {
        flex-wrap: nowrap !important;
    }
}

/* Tablet: 2 products per row */
@media (min-width: 576px) and (max-width: 991px) {
    .product-thumb-info-list > .col-sm-6,
    .product-thumb-info-list.row > .col-sm-6,
    .products.row > .col-sm-6,
    div.row.product-thumb-info-list > div.col-sm-6,
    div.row.products > div.col-sm-6,
    div.product-thumb-info-list.row > div.col-sm-6,
    div.products.row > div.col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

/* Mobile: 1 product per row */
@media (max-width: 575px) {
    .product-thumb-info-list > .col-12,
    .product-thumb-info-list.row > .col-12,
    .products.row > .col-12,
    div.row.product-thumb-info-list > div.col-12,
    div.row.products > div.col-12,
    div.product-thumb-info-list.row > div.col-12,
    div.products.row > div.col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* 💡 CRITICAL: Override Bootstrap's row > * selector with maximum specificity */
.row.product-thumb-info-list > *,
.row.products > *,
.product-thumb-info-list.row > *,
.products.row > *,
div.row.product-thumb-info-list > *,
div.row.products > *,
div.product-thumb-info-list.row > *,
div.products.row > * {
    width: auto !important;
    max-width: none !important;
}

/* Ensure Bootstrap's gutter doesn't interfere */
.row.product-thumb-info-list > *,
.row.products > *,
.product-thumb-info-list.row > *,
.products.row > *,
div.row.product-thumb-info-list > *,
div.row.products > *,
div.product-thumb-info-list.row > *,
div.products.row > * {
    padding-right: 8px !important;
    padding-left: 8px !important;
    margin-top: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* 💡 ULTRA SPECIFIC: Target exact column classes inside product rows */
div.row.product-thumb-info-list > div.col-12,
div.row.product-thumb-info-list > div.col-sm-6,
div.row.product-thumb-info-list > div.col-lg-3,
div.row.products > div.col-12,
div.row.products > div.col-sm-6,
div.row.products > div.col-lg-3,
div.product-thumb-info-list.row > div.col-12,
div.product-thumb-info-list.row > div.col-sm-6,
div.product-thumb-info-list.row > div.col-lg-3,
div.products.row > div.col-12,
div.products.row > div.col-sm-6,
div.products.row > div.col-lg-3 {
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
}

/* ============================================
   Modern Product Card Design
   ============================================ */

/* Ensure consistent product card heights */
.product-thumb-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 12px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f0f0f0;
}

    .product-thumb-info:hover {
        background-color: #fff;
        z-index: 2;
        transform: translateY(-5px);
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12) !important;
        border-color: #e0e0e0;
    }

/* Product Image with Rounded Corners */
.product-thumb-info-image {
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    position: relative;
    background-color: #f8f9fa;
    /* 💡 توحيد أبعاد الصور */
    width: 100%;
    height: 200px;
    min-height: 200px;
    max-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .product-thumb-info-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform 0.3s ease;
    }

    .product-thumb-info:hover .product-thumb-info-image img {
        transform: scale(1.05);
    }

/* ============================================
   Wishlist Button (Heart Icon) - Enhanced
   ============================================ */
.wishlist-btn-wrapper {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 20;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.wishlist-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 50%;
    color: #666;
    font-size: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    text-decoration: none;
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

    .wishlist-btn:hover {
        background-color: #fff;
        color: #e74c3c;
        transform: scale(1.15);
        box-shadow: 0 4px 16px rgba(231, 76, 60, 0.35);
        border-color: rgba(231, 76, 60, 0.2);
    }

    .wishlist-btn.active,
    .wishlist-btn.active i {
        color: #e74c3c !important;
        background-color: rgba(231, 76, 60, 0.1);
    }

    .wishlist-btn.active:hover {
        background-color: rgba(231, 76, 60, 0.15);
    }

    .wishlist-btn i {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        display: inline-block;
    }

    .wishlist-btn.active i.far {
        font-weight: 900;
    }

    .wishlist-btn.active i.fas {
        color: #e74c3c;
    }

/* Badges */
.product-thumb-info-badges-wrapper {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 20;
}

/* Add to Cart Button - Shows on Hover */
.addtocart-btn-wrapper-hover {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 0 12px 12px;
}

.product-thumb-info:hover .addtocart-btn-wrapper-hover {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.addtocart-btn-hover {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 12px 16px;
    background-color: #007bff;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3);
}

    .addtocart-btn-hover:hover {
        background-color: #0056b3;
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 123, 255, 0.4);
        color: #fff;
    }

    .addtocart-btn-hover i {
        font-size: 16px;
    }

/* Quick View Button */
.quick-view {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: rgba(255, 255, 255, 0.95);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.product-thumb-info:hover .quick-view {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

    .quick-view:hover {
        background-color: #fff;
        color: #007bff;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }

/* Product Info Wrapper */
.product-info-wrapper {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-title {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: 44px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .product-title a {
        color: #333;
        text-decoration: none;
        transition: color 0.3s ease;
    }

        .product-title a:hover {
            color: #007bff;
        }

.product-price {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

    .product-price .sale {
        color: #007bff;
        font-weight: 700;
    }

    .product-price .amount {
        font-size: 14px;
        color: #999;
        margin-left: 8px;
    }

/* Responsive Typography & Layout */
@media (max-width: 992px) {
    .product-thumb-info-list .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 768px) {
    .products-slider-container {
        height: 550px !important;
        min-height: 550px !important;
        max-height: 550px !important;
    }

    .product-thumb-info-list .col-12 {
        margin-bottom: 0;
    }

    .product-thumb-info-list .col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
        min-width: 50% !important;
    }

    .product-thumb-info-image {
        height: 160px !important;
        min-height: 160px !important;
        max-height: 160px !important;
    }

    .products-slider-wrapper {
        margin-bottom: 1rem;
    }

    .products-page-container .container {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Improve pagination on mobile */
    .pagination {
        justify-content: center;
        flex-wrap: wrap;
    }

        .pagination .page-item {
            margin: 0.25rem;
        }
}

@media (max-width: 576px) {
    .products-slider-container {
        height: 500px !important;
        min-height: 500px !important;
        max-height: 500px !important;
    }

    .product-thumb-info-list .col-12,
    .product-thumb-info-list .col-sm-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
        min-width: 100% !important;
    }

    .products-page-container {
        padding-bottom: 1rem;
    }

    .product-thumb-info-image {
        height: 150px !important;
        min-height: 150px !important;
        max-height: 150px !important;
    }

    .product-thumb-info-image img {
        height: 100% !important;
    }

    .wishlist-btn {
        width: 38px;
        height: 38px;
        font-size: 16px;
    }

    .addtocart-btn-hover {
        padding: 10px 12px;
        font-size: 12px;
    }

    /* Stack pagination info on mobile */
    .row.mt-4 .col {
        text-align: center;
    }

    .pagination.float-end {
        float: none !important;
        display: inline-block;
    }

    .text-muted.float-start {
        float: none !important;
        display: block;
        margin-top: 1rem;
    }
}

/* Pagination Styling */
.pagination {
    margin-top: 2rem;
}

    .pagination .page-link {
        color: #333;
        border-color: #dee2e6;
    }

    .pagination .page-item.active .page-link {
        background-color: #007bff;
        border-color: #007bff;
    }

/* Results Count Styling */
.text-muted {
    color: #6c757d !important;
}

/* Header & Footer Consistency */
.products-page-container {
    background-color: transparent;
}

/* 💡 إصلاح تعارض مع theme-elements.css و theme-shop.css */
/* Ensure no background covers products */
.masonry-loader {
    background-color: transparent !important;
    position: relative !important;
    z-index: 1 !important;
    overflow: visible !important;
    height: auto !important;
}

.masonry-loader.masonry-loader-showing {
    background-color: transparent !important;
    overflow: visible !important;
    height: auto !important;
    /* 💡 تجاوز الأنماط من theme-elements.css */
    min-height: 0 !important;
}

.masonry-loader-showing {
    background-color: transparent !important;
    overflow: visible !important;
    height: auto !important;
}

.masonry-loader-showing:after {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    /* 💡 إزالة الـ overlay الأبيض الذي يغطي المحتوى */
    content: none !important;
}

/* 💡 إصلاح تعارض مع theme-shop.css - المنتجات يجب أن تكون مرئية */
.masonry-loader-showing .products,
.masonry-loader.masonry-loader-showing .products {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* 💡 Ensure products are visible - تجاوز theme-shop.css */
.products {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* 💡 ضمان ظهور المنتجات حتى مع masonry-loader-showing */
.masonry-loader .products,
.masonry-loader-showing .products,
.masonry-loader.masonry-loader-showing .products {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.product {
    position: relative !important;
    z-index: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* 💡 ضمان ظهور جميع عناصر المنتج */
.product-thumb-info {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.product-thumb-info-image {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

.product-thumb-info-image img {
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Consistent font sizes with header/footer */
.product h3 {
    font-size: 1.1rem;
    line-height: 1.4;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    color: inherit !important;
}

.product h3 a {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
    color: inherit !important;
}

.price {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
    color: inherit !important;
}

.price .sale {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline !important;
    color: inherit !important;
}

/* Ensure proper alignment with header */
@media (min-width: 1200px) {
    .products-page-container .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Debug borders - Remove in production */
/* Uncomment these to check alignment during development */
/*
.products-page-container {
    border: 2px dashed red;
}

.products-page-container .container {
    border: 2px dashed blue;
}

.products-slider-wrapper {
    border: 2px dashed green;
}

.product-thumb-info {
    border: 1px dashed orange;
}
*/

/* ============================================
   FINAL OVERRIDE - Maximum Specificity
   Must be at the end to override all other styles
   ============================================ */

/* 💡 FINAL FIX: Force grid layout for products */
.products-slide .row.product-thumb-info-list,
.products-slide .row.products,
.products-slide .product-thumb-info-list.row,
.products-slide .products.row {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-left: -8px !important;
    margin-right: -8px !important;
}

.products-slide .row.product-thumb-info-list > div[class*="col-"],
.products-slide .row.products > div[class*="col-"],
.products-slide .product-thumb-info-list.row > div[class*="col-"],
.products-slide .products.row > div[class*="col-"] {
    width: auto !important;
    max-width: none !important;
    flex-shrink: 0 !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
    margin-top: 0 !important;
}

@media (min-width: 992px) {
    .products-slide .row.product-thumb-info-list > div.col-lg-3,
    .products-slide .row.products > div.col-lg-3,
    .products-slide .product-thumb-info-list.row > div.col-lg-3,
    .products-slide .products.row > div.col-lg-3 {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .products-slide .row.product-thumb-info-list > div.col-sm-6,
    .products-slide .row.products > div.col-sm-6,
    .products-slide .product-thumb-info-list.row > div.col-sm-6,
    .products-slide .products.row > div.col-sm-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

@media (max-width: 575px) {
    .products-slide .row.product-thumb-info-list > div.col-12,
    .products-slide .row.products > div.col-12,
    .products-slide .product-thumb-info-list.row > div.col-12,
    .products-slide .products.row > div.col-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }
}

/* Fix any potential overflow issues */
.products-slide {
    overflow: visible;
}

.products-slide.active {
    overflow: visible;
}

/* ============================================
   Product Details Page Styles
   ============================================ */

/* 💡 Ensure main container is visible */
.main {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    background-color: transparent !important;
    overflow: visible !important;
}

/* Ensure main.shop container is visible */
.main.shop {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    background-color: transparent !important;
    overflow: visible !important;
}

/* Ensure product details section is visible */
.main.shop .container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

/* Product Images Section */
.thumb-gallery-wrapper {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

.thumb-gallery-detail {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.thumb-gallery-detail img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100%;
    height: auto;
}

.thumb-gallery-thumbs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Product Details Section */
.summary.entry-summary {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative;
    z-index: 1;
}

.summary.entry-summary h1 {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit;
}

.summary.entry-summary .price {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.summary.entry-summary .price .sale {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: inherit;
}

.summary.entry-summary .price .amount {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.summary.entry-summary p {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Breadcrumb */
.breadcrumb {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Tabs */
.tabs {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tab-content {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tab-pane {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tab-pane.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Forms and Buttons */
.cart {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.table {
    display: table !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.btn {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Social Icons */
.social-icons {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure images are visible */
.main.shop img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 100%;
    height: auto;
}

/* Override any hiding styles */
.main.shop * {
    visibility: visible !important;
}

.main.shop *[style*="display: none"] {
    display: none !important;
}

.main.shop *[style*="visibility: hidden"] {
    visibility: hidden !important;
}

/* Ensure text is visible */
.main.shop h1,
.main.shop h2,
.main.shop h3,
.main.shop h4,
.main.shop p,
.main.shop span,
.main.shop a,
.main.shop label,
.main.shop td,
.main.shop th {
    color: inherit !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure badges and buttons are visible */
.product-thumb-info-badges-wrapper {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.addtocart-btn-wrapper {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
}

.quick-view {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* Ensure images don't overflow */
.product-thumb-info-image {
    overflow: hidden;
    border-radius: 4px;
}

.product-thumb-info-image img {
    max-width: 100%;
    height: auto;
    display: block;
}
